/**
   Copyright 2012 Shakil Siraj

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */

package com.googlecode.objectify.test.dataloader.example;

import com.googlecode.objectify.annotation.Id;


/**
 * The base class of all datastore entities.
 * 
 * @see http://turbomanage.wordpress.com/2010/01/28/simplify-with-objectify/
 * @author Shakil Siraj
 * 
 */
public class BaseDatastoreEntity {

    /**
     * The entity ID.
     */
    @Id
    private Long id;

    /**
     * The entity version number.
     */
    private Integer version = 0;

    /**
     * Getter for id.
     * 
     * @return the id
     */
    public Long getId() {
	return id;
    }

    /**
     * Setter method for id.
     * 
     * @param id
     *            the id to set
     */
    public void setId(Long id) {
	this.id = id;
    }

    /**
     * Getter for version number.
     * 
     * @return the version number
     */
    public Integer getVersion() {
	return version;
    }

    /**
     * Setter method for version.
     * 
     * @param version
     *            the version to set
     */
    public void setVersion(final Integer version) {
	this.version = version;
    }

}
